package whu.iss.services.impl.sys;

import whu.iss.pojo.UserCustom;
import whu.iss.system.db.DBUtils;

public class RegisterServices 
{	
	public boolean isUsernameExist(String username)throws Exception
	{
		int flag=DBUtils.getUserMapper().isUserExist(username);
		DBUtils.close();
		if(flag>0) 
		{
			return true; 
		}
		else 
		{
			return false;
		}	
	}
	
	public void insertUser(UserCustom usercustom) throws Exception
	{
		DBUtils.getUserMapper().insertUser(usercustom);
		DBUtils.commit();
		DBUtils.close();
	}
}
